package com.dingwen.treasure.kettle.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import com.dingwen.treasure.kettle.base.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;


/**
 * 执行结果枚举
 *
 * @author dingwen
 * @date 2022/05/09
 */
@Getter
@AllArgsConstructor
public enum ExecuteResultEnum implements BaseEnum<Integer> {

    /**
     * 失败
     */

    FAIL(0, "失败"),

    /**
     * 成功
     */

    SUCCESS(1, "成功");

    /**
     * code
     */
    @EnumValue
    private final Integer code;

    /**
     * 描述
     */
    @JsonValue
    private final String description;


    /**
     * 获取枚举类描述
     *
     * @return {@link String}
     */
    @Override
    public String getEnumDescription() {
        return "执行状态";
    }
}
